home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1995 November
/
EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso
/
earcd
/
util
/
text
/
xes.lha
/
XES
/
REXX
/
Mode.xdme
< prev
next >
Wrap
Text File
|
1995-08-16
|
857b
|
22 lines
/* $VER: Mode.xdme 1.1 (16 Aug 1995) */
/* Copyright © 1995 Fergus Duniho */
/* Selects the appropriate mode according to the file name */
ARG name
dot = Lastpos(".", name)
IF dot ~= 0 THEN ext = Substr(name, dot)
SELECT
WHEN ext = ".HTML" THEN "html-mode"
WHEN ext = ".C" | ext = ".CC" | ext = ".H" THEN "c-mode"
WHEN ext = ".TXT" | ext = ".DOC" | ext = ".DOK" THEN "text-mode"
WHEN ext = ".GUIDE" THEN "amigaguide-mode"
WHEN ext = ".MAN" THEN "manual-mode"
WHEN ext = ".el" | pos("INSTALL", name) > 0 THEN "lisp-mode"
WHEN ext = ".REXX" | ext = ".XDME" | pos(":REXX/",name) > 0 | pos("/REXX/", name) > 0 | left(name,5) = "REXX:" THEN "arexx-mode"
WHEN pos(":S/",name) > 0 | pos("/S/", name) > 0 | left(name,2) = "S:" THEN "programming-mode"
WHEN dot ~= 0 THEN "fundamental-mode"
OTHERWISE "programming-mode"
END